$(function(){
	$('#stu-table').datagrid({
		title:'学生基本信息',
		iconCls:'icon-save',		
		url:'mentor/student.do?action=list',
		pagination:true,	//显示分页
		rownumbers:true, 	//显示行号
		fitColumns: true, 	//自动调整各列，用了这个属性，下面各列的宽度值就只是一个比例。
		collapsible:true,	//可折叠
		singleSelect:false,	//允许多选
		idField:'id', 	//主键字段,easyui的datagrid有个bug,必须把主键单独列出,才能多选  
		columns:[[
			{field:'ck',checkbox:true,width:2}, //显示复选框
			{field:'id',title:'id',width:15,align:'center'},
			{field:'studentId',title:'学号',width:15,align:'center'},
			{field:'card',title:'身份证号',width:5,align:'center'},
			{field:'name',title:'姓名',width:20,align:'center'},
			{field:'sex',title:'性别',width:15,align:'center'},
			{field:'phone',title:'电话',width:15,align:'center'}
		]],
		toolbar:[{
			text:'新增',
			iconCls:'icon-add'
		},'-',{
			text:'修改',
			iconCls:'icon-edit'
		},'-',{
			text:'删除',
			iconCls:'icon-remove'
		},'-',{
			text:'查找',
			iconCls:'icon-search'
		}]
	});  
});
